﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using MP.Core.Library;
using MP.LayerHelper.MP_OBS.BLL;
using MP.LayerHelper.MP_OBS.DAL.EntityClasses;

public partial class Member_Tools_Control_PagesLogView : MP.Core.Authentication.Control.AuthenBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadData();
        }
    }

    void loadData()
    {
        DataTable tbl = MbLogPageManager.CreateInstant().GetLogViews(FGuid.ToGuid(Request["page"]), FDateTime.ConvertDate(Request["date"]));
        rep.DataSource = tbl;
        rep.DataBind();

        DataTable tmp = MbPageManager.CreateInstant().SelectByIdRDT(FGuid.ToGuid(Request["page"]));
        if (tmp != null && tmp.Rows.Count > 0)
        {
            lblPageName.Text = string.IsNullOrEmpty(tmp.Rows[0]["PageName"].ToString()) ? tmp.Rows[0]["PageId"].ToString() : tmp.Rows[0]["PageName"].ToString();
        }
    }
}
